import QRCode from "../../utils/weapp-qrcode.js" //引入生成二维码的插件
let app = getApp();
Page({
  ...app.globalData.function,
  data: {
    ...app.globalData.config,
      orderId:'',  
      order_list:{},    
      shopInfo:{},
        
    },
    onLoad: function (options) {
      this.setData({
        orderId:options.orderId
      })
      
      // setTimeout(()=>{
      //   this.selectComponent("#page").hideLoading()
      // },2000)
    },

    //申请退款
    dorefundorder(event){    
      let gorderId=event.currentTarget.dataset.orderid
      let g_ids=[];
      g_ids.push(gorderId)
      let gorderid=g_ids.toString()
      let order_id=this.data.orderId
      this.router("/pagesOrder/refundOrder/index?gorderid="+gorderid+"&order_id="+order_id)
    },

    //申请退还货物
    dorefundselect(){
      this.router("/pagesOrder/refundSelect/index")
    },
 
    onShow(){
      let that=this     
      let obj_data={
        token:this.getStorage('user_info').wx_openid,
        order_id:this.data.orderId
      }      
      this.orderInfo(obj_data).then(res=>{               
        if(res.resCode=="9999"){
          that.setData({
            order_list:res.data
          })
        }else{
          wx.showToast({title:res.resMessage,icon:"none"})
        }
      })     
    },
    
})